#include<stdio.h>
int main()
{
	int n, m, c, d;
	scanf_s("%d %d", &n, &m);
	c = n / m;
	d = n % m;

	printf("%d %d", c, d);
	return 0;

}